package com.ruoyi.project.system.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.mapper.SysGoodsPariseMapper;
import com.ruoyi.project.system.domain.SysGoodsParise;
import com.ruoyi.project.system.service.ISysGoodsPariseService;

/**
 * 二手物品点赞Service业务层处理
 * 
 * @author jjp
 * @date 2020-04-22
 */
@Service
public class SysGoodsPariseServiceImpl implements ISysGoodsPariseService 
{
    @Autowired
    private SysGoodsPariseMapper sysGoodsPariseMapper;

    /**
     * 查询二手物品点赞
     * 
     * @param pariseId 二手物品点赞ID
     * @return 二手物品点赞
     */
    @Override
    public SysGoodsParise selectSysGoodsPariseById(Long pariseId)
    {
        return sysGoodsPariseMapper.selectSysGoodsPariseById(pariseId);
    }

    @Override
    public List<SysGoodsParise> selecUserNameById(Long goodsId) {
        return sysGoodsPariseMapper.selecUserNameById(goodsId);
    }

    /**
     * 查询二手物品点赞列表
     * 
     * @param sysGoodsParise 二手物品点赞
     * @return 二手物品点赞
     */
    @Override
    public List<SysGoodsParise> selectSysGoodsPariseList(SysGoodsParise sysGoodsParise)
    {
        return sysGoodsPariseMapper.selectSysGoodsPariseList(sysGoodsParise);
    }

    /**
     * 新增二手物品点赞
     * 
     * @param sysGoodsParise 二手物品点赞
     * @return 结果
     */
    @Override
    public int insertSysGoodsParise(SysGoodsParise sysGoodsParise)
    {
        sysGoodsParise.setCreateDate(DateUtils.getNowDate());
        return sysGoodsPariseMapper.insertSysGoodsParise(sysGoodsParise);
    }

    /**
     * 修改二手物品点赞
     * 
     * @param sysGoodsParise 二手物品点赞
     * @return 结果
     */
    @Override
    public int updateSysGoodsParise(SysGoodsParise sysGoodsParise)
    {
        return sysGoodsPariseMapper.updateSysGoodsParise(sysGoodsParise);
    }

    /**
     * 批量删除二手物品点赞
     * 
     * @param pariseIds 需要删除的二手物品点赞ID
     * @return 结果
     */
    @Override
    public int deleteSysGoodsPariseByIds(Long[] pariseIds)
    {
        return sysGoodsPariseMapper.deleteSysGoodsPariseByIds(pariseIds);
    }

    /**
     * 删除二手物品点赞信息
     * 
     * @param pariseId 二手物品点赞ID
     * @return 结果
     */
    @Override
    public int deleteSysGoodsPariseById(Long pariseId)
    {
        return sysGoodsPariseMapper.deleteSysGoodsPariseById(pariseId);
    }

    @Override
    public int pariseCount(SysGoodsParise sysGoodsParise) {
        return sysGoodsPariseMapper.pariseCount(sysGoodsParise);
    }
}
